add_subdirectory(utils)

# Create list of all headers
set(dis7_hdr
  AcknowledgePdu.h
  AcknowledgeReliablePdu.h
  AcousticEmitter.h
  ActionRequestPdu.h
  ActionRequestReliablePdu.h
  ActionResponsePdu.h
  ActionResponseReliablePdu.h
  AggregateIdentifier.h
  AggregateMarking.h
  AggregateType.h
  AngleDeception.h
  AngularVelocityVector.h
  AntennaLocation.h
  ArealObjectStatePdu.h
  ArticulatedParts.h
  Association.h
  AttachedParts.h
  Attribute.h
  AttributePdu.h
  BeamAntennaPattern.h
  BeamData.h
  BeamStatus.h
  BlankingSector.h
  ClockTime.h
  CollisionElasticPdu.h
  CollisionPdu.h
  CommentPdu.h
  CommentReliablePdu.h
  CommunicationsNodeID.h
  CreateEntityPdu.h
  CreateEntityReliablePdu.h
  DataPdu.h
  DataQueryDatumSpecification.h
  DataQueryPdu.h
  DataQueryReliablePdu.h
  DataReliablePdu.h
  DatumSpecification.h
  DeadReckoningParameters.h
  DesignatorPdu.h
  DetonationPdu.h
  DirectedEnergyAreaAimpoint.h
  DirectedEnergyDamage.h
  DirectedEnergyFirePdu.h
  DirectedEnergyPrecisionAimpoint.h
  DirectedEnergyTargetEnergyDeposition.h
  DistributedEmissionsFamilyPdu.h
  EEFundamentalParameterData.h
  EightByteChunk.h
  ElectromagneticEmissionBeamData.h
  ElectromagneticEmissionsPdu.h
  ElectromagneticEmissionSystemData.h
  EmitterSystem.h
  EngineFuel.h
  EngineFuelReload.h
  EntityAssociation.h
  EntityDamageStatusPdu.h
  EntityID.h
  EntityInformationFamilyPdu.h
  EntityManagementFamilyPdu.h
  EntityMarking.h
  EntityStatePdu.h
  EntityStateUpdatePdu.h
  EntityType.h
  EntityTypeVP.h
  EnvironmentGeneral.h
  Environment.h
  EnvironmentType.h
  EulerAngles.h
  EventIdentifier.h
  EventIdentifierLiveEntity.h
  EventReportPdu.h
  EventReportReliablePdu.h
  ExpendableDescriptor.h
  Expendable.h
  ExpendableReload.h
  ExplosionDescriptor.h
  FalseTargetsAttribute.h
  FastEntityStatePdu.h
  FirePdu.h
  FixedDatum.h
  FourByteChunk.h
  FundamentalOperationalData.h
  GridAxis.h
  GroupIdentifier.h
  IffDataSpecification.h
  IFFFundamentalParameterData.h
  IFFPdu.h
  IntercomCommunicationsParameters.h
  IntercomIdentifier.h
  IntercomSignalPdu.h
  IOCommunicationsNode.h
  IOEffect.h
  IsPartOfPdu.h
  JammingTechnique.h
  LaunchedMunitionRecord.h
  LayerHeader.h
  LinearObjectStatePdu.h
  LinearSegmentParameter.h
  LiveEntityIdentifier.h
  LiveEntityPdu.h
  LiveSimulationAddress.h
  LogisticsFamilyPdu.h
  MineEntityIdentifier.h
  MinefieldFamilyPdu.h
  MinefieldIdentifier.h
  MinefieldResponseNackPdu.h
  MinefieldStatePdu.h
  ModulationParameters.h
  ModulationType.h
  MunitionDescriptor.h
  Munition.h
  MunitionReload.h
  NamedLocationIdentification.h
  ObjectIdentifier.h
  ObjectType.h
  OwnershipStatus.h
  PduContainer.h
  Pdu.h
  PduHeader.h
  PduStatus.h
  PduSuperclass.h
  PointObjectStatePdu.h
  PropulsionSystemData.h
  RadioCommunicationsFamilyPdu.h
  RadioIdentifier.h
  RadioType.h
  ReceiverPdu.h
  RecordQueryReliablePdu.h
  RecordQuerySpecification.h
  RecordSpecificationElement.h
  RecordSpecification.h
  Relationship.h
  RemoveEntityPdu.h
  RemoveEntityReliablePdu.h
  RepairCompletePdu.h
  RepairResponsePdu.h
  ResupplyOfferPdu.h
  ResupplyReceivedPdu.h
  SecondaryOperationalData.h
  SeesPdu.h
  Sensor.h
  SeparationVP.h
  ServiceRequestPdu.h
  SetDataPdu.h
  SetDataReliablePdu.h
  SimulationAddress.h
  SimulationIdentifier.h
  SimulationManagementFamilyPdu.h
  SimulationManagementPduHeader.h
  SimulationManagementWithReliabilityFamilyPdu.h
  StandardVariableSpecification.h
  StartResumePdu.h
  StartResumeReliablePdu.h
  StopFreezePdu.h
  StopFreezeReliablePdu.h
  StorageFuel.h
  StorageFuelReload.h
  SupplyQuantity.h
  SyntheticEnvironmentFamilyPdu.h
  SystemIdentifier.h
  TotalRecordSets.h
  TrackJamData.h
  TwoByteChunk.h
  UAFundamentalParameter.h
  UaPdu.h
  UnattachedIdentifier.h
  UnsignedDISInteger.h
  VariableDatum.h
  VariableParameter.h
  VariableTransmitterParameters.h
  Vector2Float.h
  Vector3Double.h
  Vector3Float.h
  VectoringNozzleSystem.h
  WarfareFamilyPdu.h
)

# Create list of all source files
set(dis7_src
  AcknowledgePdu.cpp
  AcknowledgeReliablePdu.cpp
  AcousticEmitter.cpp
  ActionRequestPdu.cpp
  ActionRequestReliablePdu.cpp
  ActionResponsePdu.cpp
  ActionResponseReliablePdu.cpp
  AggregateIdentifier.cpp
  AggregateMarking.cpp
  AggregateType.cpp
  AngleDeception.cpp
  AngularVelocityVector.cpp
  AntennaLocation.cpp
  ArealObjectStatePdu.cpp
  ArticulatedParts.cpp
  Association.cpp
  AttachedParts.cpp
  Attribute.cpp
  AttributePdu.cpp
  BeamAntennaPattern.cpp
  BeamData.cpp
  BeamStatus.cpp
  BlankingSector.cpp
  ClockTime.cpp
  CollisionElasticPdu.cpp
  CollisionPdu.cpp
  CommentPdu.cpp
  CommentReliablePdu.cpp
  CommunicationsNodeID.cpp
  CreateEntityPdu.cpp
  CreateEntityReliablePdu.cpp
  DataPdu.cpp
  DataQueryDatumSpecification.cpp
  DataQueryPdu.cpp
  DataQueryReliablePdu.cpp
  DataReliablePdu.cpp
  DatumSpecification.cpp
  DeadReckoningParameters.cpp
  DesignatorPdu.cpp
  DetonationPdu.cpp
  DirectedEnergyAreaAimpoint.cpp
  DirectedEnergyDamage.cpp
  DirectedEnergyFirePdu.cpp
  DirectedEnergyPrecisionAimpoint.cpp
  DirectedEnergyTargetEnergyDeposition.cpp
  DistributedEmissionsFamilyPdu.cpp
  EEFundamentalParameterData.cpp
  EightByteChunk.cpp
  ElectromagneticEmissionBeamData.cpp
  ElectromagneticEmissionsPdu.cpp
  ElectromagneticEmissionSystemData.cpp
  EmitterSystem.cpp
  EngineFuel.cpp
  EngineFuelReload.cpp
  EntityAssociation.cpp
  EntityDamageStatusPdu.cpp
  EntityID.cpp
  EntityInformationFamilyPdu.cpp
  EntityManagementFamilyPdu.cpp
  EntityMarking.cpp
  EntityStatePdu.cpp
  EntityStateUpdatePdu.cpp
  EntityType.cpp
  EntityTypeVP.cpp
  Environment.cpp
  EnvironmentGeneral.cpp
  EnvironmentType.cpp
  EulerAngles.cpp
  EventIdentifier.cpp
  EventIdentifierLiveEntity.cpp
  EventReportPdu.cpp
  EventReportReliablePdu.cpp
  Expendable.cpp
  ExpendableDescriptor.cpp
  ExpendableReload.cpp
  ExplosionDescriptor.cpp
  FalseTargetsAttribute.cpp
  FastEntityStatePdu.cpp
  FirePdu.cpp
  FixedDatum.cpp
  FourByteChunk.cpp
  FundamentalOperationalData.cpp
  GridAxis.cpp
  GroupIdentifier.cpp
  IffDataSpecification.cpp
  IFFFundamentalParameterData.cpp
  IFFPdu.cpp
  IntercomCommunicationsParameters.cpp
  IntercomIdentifier.cpp
  IntercomSignalPdu.cpp
  IOCommunicationsNode.cpp
  IOEffect.cpp
  IsPartOfPdu.cpp
  JammingTechnique.cpp
  LaunchedMunitionRecord.cpp
  LayerHeader.cpp
  LinearObjectStatePdu.cpp
  LinearSegmentParameter.cpp
  LiveEntityIdentifier.cpp
  LiveEntityPdu.cpp
  LiveSimulationAddress.cpp
  LogisticsFamilyPdu.cpp
  MineEntityIdentifier.cpp
  MinefieldFamilyPdu.cpp
  MinefieldIdentifier.cpp
  MinefieldResponseNackPdu.cpp
  MinefieldStatePdu.cpp
  ModulationParameters.cpp
  ModulationType.cpp
  Munition.cpp
  MunitionDescriptor.cpp
  MunitionReload.cpp
  NamedLocationIdentification.cpp
  ObjectIdentifier.cpp
  ObjectType.cpp
  OwnershipStatus.cpp
  PduContainer.cpp
  Pdu.cpp
  PduHeader.cpp
  PduStatus.cpp
  PduSuperclass.cpp
  PointObjectStatePdu.cpp
  PropulsionSystemData.cpp
  RadioCommunicationsFamilyPdu.cpp
  RadioIdentifier.cpp
  RadioType.cpp
  ReceiverPdu.cpp
  RecordQueryReliablePdu.cpp
  RecordQuerySpecification.cpp
  RecordSpecification.cpp
  RecordSpecificationElement.cpp
  Relationship.cpp
  RemoveEntityPdu.cpp
  RemoveEntityReliablePdu.cpp
  RepairCompletePdu.cpp
  RepairResponsePdu.cpp
  ResupplyOfferPdu.cpp
  ResupplyReceivedPdu.cpp
  SecondaryOperationalData.cpp
  SeesPdu.cpp
  Sensor.cpp
  SeparationVP.cpp
  ServiceRequestPdu.cpp
  SetDataPdu.cpp
  SetDataReliablePdu.cpp
  SimulationAddress.cpp
  SimulationIdentifier.cpp
  SimulationManagementFamilyPdu.cpp
  SimulationManagementPduHeader.cpp
  SimulationManagementWithReliabilityFamilyPdu.cpp
  StandardVariableSpecification.cpp
  StartResumePdu.cpp
  StartResumeReliablePdu.cpp
  StopFreezePdu.cpp
  StopFreezeReliablePdu.cpp
  StorageFuel.cpp
  StorageFuelReload.cpp
  SupplyQuantity.cpp
  SyntheticEnvironmentFamilyPdu.cpp
  SystemIdentifier.cpp
  TotalRecordSets.cpp
  TrackJamData.cpp
  TwoByteChunk.cpp
  UAFundamentalParameter.cpp
  UaPdu.cpp
  UnattachedIdentifier.cpp
  UnsignedDISInteger.cpp
  VariableDatum.cpp
  VariableParameter.cpp
  VariableTransmitterParameters.cpp
  Vector2Float.cpp
  Vector3Double.cpp
  Vector3Float.cpp
  VectoringNozzleSystem.cpp
  WarfareFamilyPdu.cpp
)

# CMake < 3.16 requires target_sources to be specified as
# absolute paths if not in the same directory as the target
# definition. If cmake_minimum_required is ever changed to
# be >= 16, this line can be removed.
list(TRANSFORM dis7_src PREPEND "${CMAKE_CURRENT_LIST_DIR}/")

include(GenerateExportHeader)
generate_export_header(OpenDIS7)
list(APPEND dis7_hdr "${CMAKE_CURRENT_BINARY_DIR}/opendis7_export.h")

target_sources(OpenDIS7 PRIVATE ${dis7_src})

install(FILES ${dis7_hdr}
        DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dis7)
